\documentclass[12pt]{article}
%\usepackage{fullpage}

\usepackage{graphicx}        % Enable graphics commands
\usepackage{lscape}		% Enable landscape with \begin{landscape} until \end{landscape}
\usepackage{natbib}			% Enable citation commands \citep{}, \citet{}, etc.
\bibpunct{(}{)}{;}{a}{}{,}		% Formatting for in-text citations
\usepackage{setspace}		% Enable double-spacing with \begin{spacing}{2} until \end{spacing}.
\usepackage[utf8]{inputenc} 	% Enable utf8 characters, i.e., accents without coding--just type them in.
\usepackage[english]{babel}	% English hyphenation and alphabetization.  Other languages available.
\usepackage{dcolumn}        % For decimal-aligned stargazer/texreg output.
\usepackage[colorlinks=true, urlcolor=blue, citecolor=black, linkcolor=black]{hyperref} % Include hyperlinks with the \url and \href commands.
\setlength{\tabcolsep}{1pt}	% Make tables slightly narrower by reducing space between columns.
\usepackage{afterpage}
\usepackage{hanging}
\usepackage{fullpage}

\usepackage{ntheorem}
\newtheorem{hyp}{Hypothesis} 

\renewcommand\floatpagefraction{.9}	% These commands allow larger tables and graphics to fit
\renewcommand\topfraction{.9}		% on a page when default settings would complain.
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}

\newcommand{\R}{\textsf{R}~}        %This creates the command \R to typeset the name R correctly.
\mathchardef\mhyphen="2D            %Math-mode hyphen
% This creates a command for footnotes without markers:
\newcommand\blfootnote[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

\begin{document}

<<include=FALSE>>=
library(knitr)
opts_chunk$set(
concordance=TRUE,
cache=FALSE,
message=FALSE
)
@


\title{The Dynamics of Party Relabeling:\\ Why Do Parties Change Names?}
\author{
    Mi-Son Kim\thanks{Mi-son Kim studies comparative political parties and electoral systems with a regional interest in East Asia. Her research agenda focuses on the strategic behavior of political parties in their interaction with institutional conditions, public opinion, and political culture.  She studies how these patterns of strategic behavior affect governance and policy-making processes.  Her dissertation examines the causes and consequences of party relabeling and focuses on four cases in depth: South Korea, France, Taiwan, and the United States.}\\
    \href{mailto:mi-son-kim@uiowa.edu}{mi-son-kim@uiowa.edu}
    \and
    Frederick Solt\thanks{Frederick Solt is Assistant Professor of Political Science at the University of Iowa.  His primary research interests are in comparative politics and focus on the consequences of economic inequality for political attitudes and behavior. His work on this topic has appeared in the \emph{American Journal of Political Science}, the \emph{Journal of Politics}, the \emph{British Journal of Political Science, and other journals}. To facilitate this research, he created and maintains the Standardized World Income Inequality Database (SWIID), which provides the most comparable data available on income inequality for countries around the world over the past half-century.}\\
    \href{mailto:frederick-solt@uiowa.edu}{frederick-solt@uiowa.edu}
}
\date{}				
\maketitle

\begin{abstract}
Contrary to longstanding arguments that equate parties with durable, information-rich brand names, relabeling of parties is not rare, and in many countries it is not even very unusual.  This paper provides the first effort to document this neglected phenomenon.  It finds that across European democracies, roughly a third of all parties have relabeled themselves at least once since 1945, and a similar proportion of elections include at least one party running under a new name.  It then presents analyses of why parties change names more frequently in some circumstances, finding support for three explanations derived from the existing literature: parties with longer-standing brands are less likely to shed them, but relabeling is more likely for parties that suffer electoral setbacks and for parties in weaker party systems.  Finally, it presents evidence that the end of Soviet communism made left parties more likely to rename themselves.\blfootnote{Complete replication materials for this article are available at \url{https://dataverse.harvard.edu/dataverse/fsolt}.}
\end{abstract}

\newpage
\begin{spacing}{2}

Much of the existing literature on political parties considers one of their primary functions to be providing a ``brand name'' to groups of politicians seeking to win office. Through their labels, parties identify candidates to voters and provide voters with information about their ideological preferences. In short, party labels convey established reputations and provide a crucial information shortcut for voters \citep{Aldrich1995, Campbell1960, Downs1957, Kiewiet1991, Snyder2002}. In legislatures, politicians under the same labels behave similarly though the degree of this intra-party coherence varies across parties and party systems \citep{Cox1993, Kiewiet1991, Snyder2000}. A tacit assumption of the literature is that party labels are unlikely to change; given the informational assets that a party label carries, the longer it lasts the better it serves.

As a result, party name change has been viewed as an anomaly caused by internal and external shocks that disturb the \textit{status quo} equilibrium \citep{Harmel1994, Harmel1995, Harmel2003} or a phenomenon symptomatic of unstable, weakly institutionalized party systems \citep{Mainwaring1995b, Stockton2001, Mainwaring2006}. Put differently, the existent literature suggests that party name change is or should be rare. This paper provides a first empirical investigation of how often parties actually change their names. Further, it provides a first test of how well the phenomenon can be explained by the theories implicit in the existing literature---those regarding brand exposure, electoral shocks, and weak party systems.

Overall, this paper finds that party name change is not as rare as typically assumed. Across European democracies, roughly a third of all parties have relabeled themselves at least once since 1945, and a similar proportion of elections include at least one party running under a new name. In addition, it finds that the existing explanations generally perform well in predicting when parties in the European context choose to relabel themselves. In line with the brand-exposure hypothesis, long-established party names are less likely to be discarded than newer ones. As the electoral-shock hypothesis suggests, poor electoral performance tends to precipitate relabeling. Lastly, conforming to the prediction of the party-system-weakness hypothesis, parties in systems with a higher degree of electoral volatility are more likely to change their labels.


\section*{Parties as Brand Names}
In the commercial context, brands are understood as the names and symbols used by firms to differentiate their offerings from those provided by competing firms \citep[see, e.g.,][117]{Jevons2005}.  As parties are in competition for citizens' votes in a fashion similar to how sellers compete for consumers' spending, it is no surprise that terms like ``party brands,'' ``political brands,'' ``ideological brands,'' or ``brand leaders'' are increasingly in use in recent research on parties \citep[see, e.g.,][]{Needham2005, Needham2006, Scammell2007, Woon2008, Pope2008, Lupu2013, Neiheisel2013, WintherNielsen2014}.

Viewed as a brand, a party contains in its label some form of established reputation and image. \citet{Lupu2013} describes a party brand as being composed of prototypes that voters associate with that party.  It is this brand equity attached to a party label that increases the likelihood that a candidate affiliated with the party wins elections, all else equal \citep{Aldrich1995}. Parties as brands enable voters to differentiate among broadly similar political products, such as candidates and their labels reduce the cost to voters of information on candidates and parties themselves. Voters using party labels as an information shortcut can make informed decisions based on the ideologies and policy issues represented, albeit vaguely, by each party label without knowing all the details \citep{Downs1957, Kiewiet1991}.  In this regard, researchers of voting behavior have long recognized party identification as one of the most decisive factors that explain an individual's voting decision \citep{Campbell1960}.

Besides their function in the electorate, party labels also play a role as brands for politicians in government. Through legislating and voting consistently according to their party platform, politicians in the legislature build expectations and reputation about their behavior, adding more brand value to their party label \citep{Kiewiet1991, Cox1993, Pope2008, Woon2008}. Given that individual members of the legislature are constantly exposed to incentives to pursue their individual interests which oftentimes are in conflict with their party goals, a brand-value-laden party label is not something that is achieved effortlessly. Nonetheless, studies show that parliamentary parties manage to build reputations and brand name value for their labels through exerting a substantial amount of disciplinary power over their individual members \citep{Cox1993, Rohde1991, Rohde1995, Snyder2000}.

We note from the discussions above that the extant literature on parties as brands assumes that party label change is unlikely. Since there is information attached to the party label in a form of reputations or expectations, a change in a party's label impairs its brand name. Also because a brand name is a long-term product, once the label is changed, it takes time to restore the informational value it used to have under the old label, which in turn hurts the party in the political market by denying voters the informational heuristic they depend upon in choosing to lend that party their support. 

Due to this assumption of stability, the existing literature does not have much to say about the causes of party relabeling.  Instead, it raises the normative concern that party relabeling is undesirable for representation in a democracy. It confuses voters by making it harder for them to identify candidates than otherwise, which in turn hinders the voters from voting ``correctly'' as they would with full information \citep{Lau1997}.


\section*{When Do Parties Change Names?}
How then can we understand party relabeling? In this section, we propose three possible explanations that can be inferred from the existing literature on party politics and marketing. The first is the brand-exposure hypothesis. As discussed above, the parties-as-brands literature is based on an assumption of stability: party labels are informational assets that are only gradually accumulated over time and therefore, from a party's perspective, relabeling is an extremely costly exercise.  This parallels the view of research in marketing.  Strong brand equity is a product of well-maintained long-term brand management; an overarching consistency and a subtle balance between continuity and innovation are crucial to brand repositioning and extension \citep[see, e.g.,][]{Aaker1991, Muzellec2006, Merrilees2008}.  As a result, changing a brand's name is a radical and profoundly risky step: ``As the name is the anchor for brand equity, the change of name might not only damage the brand equity, it might simply destroy it'' \citep[807]{Muzellec2006}. Whether in politics or the marketplace, rebranding means that the awareness of and positive associations with a name---awareness and associations that took years to build---are eliminated overnight. 

A strong party label is a political brand that enjoys a high level of awareness and reputation of providing quality goods and services in politics, provokes lots of positive associated images and reputations among voter-consumers and thereby elicits strong loyalty from them.  Such strength, then, is a long-term product, and once acquired, a party loses a great deal by relabeling itself: A party damages the basis of its brand equity when wiping out its established label.  Here, label experience---that is, brand exposure---for an extended period of time is a necessary condition for a strong party brand. Therefore, the brand-exposure hypothesis stipulates that the longer the party label has been used, the better it serves as a brand, and the more costly it is to change. Therefore, brand-exposure hypothesis predicts that the more times a party has put a name before voters, the less likely it is to change that name.

The second is the electoral-shock hypothesis, which we draw from the literature on party change. This literature examines factors that cause changes in a party such as leadership change, platform change, or institutional reforms. From this standpoint, parties are organizations, and like other organizations they are essentially conservative, preferring the \textit{status quo} over change \citep{Michels1962, Panebianco1988, Harmel1994}.  Among businesses, underperformance in the market is a common trigger for organizational change, a bid for revitalization \citep{Merrilees2008}.  Similarly, parties are likely to undertake reforms only when a party experiences a disappointing performance at the polls.  ``Electoral defeat and deterioration,'' \citet[243]{Panebianco1988} wrote, ``exert very strong pressure on the party'' to change. 

Previous work has found empirical support for this theory.  Examining a broad index of 26 forms of organizational change---including party relabeling---in British and German parties from 1950 to 1990, \citet[3]{Harmel1995} concluded that poor electoral performance was the ``mother of change.''  \cite{Janda1995}, in a study of eight parties in Britain, Germany, and the United States over the postwar period, found that these parties grew more likely to seek to put a new identity before the electorate by changing the relative salience devoted to different issues in their manifestos as their electoral performance grew more disappointing.  On the basis of the electoral-shock hypothesis, we therefore predict that the more disappointing their performance in the last election, the more likely parties are to change their names.

The final explanation we propose is the party-system-weakness hypothesis, motivated by the literature on party system consolidation. A consolidated or stable party system is defined as the one in which interactions among its constitutive parties are well established and widely known. This concept entails stability and regularity in the patterns of interparty competition and strong ties between parties and electorates \citep{Mainwaring1995b, Mainwaring2006, Randall2002, Sartori1976, Tavits2008, Toole2000}.   According to this literature, parties that lack a stable support base are considered less institutionalized and a system that is characterized by many such parties is deemed weak and undesirable.  As a result, voters in such party systems vote erratically from election to election, which is captured by high levels of electoral volatility. 

In order to understand the relationship between party system consolidation and party relabeling, it is worth paying more attention to the aspect of strong party-voter ties that is entailed in the concept of party system consolidation. \cite{Mainwaring1995b} emphasize the importance of a party's having stable roots in society as a measure of party system consolidation. A system with stable party-voter ties implies that parties have already obtained solid political brands and voters have many positive associations with their labels. Put in terms of the marketplace, stable party-voter ties represent a high degree of brand loyalty, one of the most valuable dimensions of brand equity \citep[see][]{Aaker1991}. On the contrary, a weak party system implies an absence or a low degree of party brand loyalty where the majority of voters do not display loyalty or a strong emotional attachment to any of the parties in the system. Instead, these political consumers are largely undecided in terms of their party identification. In short, the former setting indicates strong party brands whereas the latter suggests weak party brands. As a consequence, it is expected that in the former setting, party name changes would incur considerable costs, discouraging this practice, while the cost of party relabeling would be lower in the latter, making relabeling more common. This is the crux of what we term the party-system-weakness hypothesis. In line with this prediction, then, we hypothesize that the more electoral volatility there was in the last election, the more likely parties are to change their names.\footnote{\doublespacing One might also argue to the contrary that a system of weak party brands raises the incentive for parties to stand out by retaining their names and thereby building stronger brands.  We are grateful to a reviewer for raising this point.  We allow the question to be settled empirically below.}

The assumption of the party-as-brand literature that party labels are enduring, information-rich signals is only potentially troublesome---and the theories outlined above are only useful---if parties periodically shed their brands in favor of new labels.  In the next section, we provide a first enumeration of the extent of this phenomenon across the democracies of Europe.


\section*{Party Relabeling Across Europe}
One unfortunate consequence of the lack of scholarly attention to the phenomenon of party relabeling is that many relevant datasets have often treated the actual names of the parties whose characteristics they record with a certain cavalier disregard.  For example, the party that is recorded in the \href{http://www.parlgov.org}{ParlGov database} \citep{Doring2012} as simply ``Gaullists,'' actually first appeared on French ballots in 1946 as the \textit{Union Gaullist} (UG), then as the \textit{Rassemblement du peuple français} (RPF), then as the \textit{Union pour la nouvelle république} (UNR), then as the \textit{Union pour la défense de la République} (UDR), and finally, in the 1973 elections, as the \textit{Union des démocrates pour la République} (again UDR).  This inattention presents a formidable challenge.

<<label=setup, echo=F, results='hide'>>=
library(doBy)

load("change_data.RData") # run rebranding_scrape.R to generate this file

eu.plus3 <- c("Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus", 
              "Czech Republic", "Denmark", "Estonia", "Finland", "France", 
              "Germany", "Greece", "Hungary", "Ireland", "Italy", "Latvia", 
              "Lithuania", "Luxembourg", "Malta", "Netherlands", "Poland",
              "Portugal", "Romania", "Slovakia", "Slovenia", "Spain", 
              "Sweden", "United Kingdom", "Iceland", "Norway", "Switzerland")

change.data <- change.data[change.data$country %in% eu.plus3,]

change.party <- summaryBy(change~country+party, data=change.data[change.data$country %in% eu.plus3,], FUN=c(max, sum), keep.names=T)
change.party <- change.party[with(change.party, (party!="Others"&party!="Independents"&party!="Others/Ind.")),]
change.party$change.total <- change.party$change.sum
change.party$change.total[change.party$change.total>=3] <- "3 or more"

change.election <- summaryBy(change~country+year, data=change.data, FUN=c(max, sum))
change.election$change.total <- change.election$change.sum
change.election$change.total[change.election$change.total>=3] <- "3 or more"

change.country <- summaryBy(change.max~country, data=change.party, FUN=c(mean), keep.names=T)
@

We identified Wolfram Nordsieck's (\citeyear{Nordsieck2014}) \href{http://www.parties-and-elections.eu}{Parties and Elections in Europe} as the best available cross-national source on parties' names.  Norsieck has drawn on a host of country-specific resources to carefully identify the parties that contested national elections across the continent, the names they ran on, and their vote shares.  One disadvantage of this source, however, is that the information it contains is spread across many separate webpages and the information on party names appears only as blocks of text.  Nevertheless, taking advantage of the webscraping and text-handling capabilities of the \R packages \texttt{XML} \citep{Lang2015} and \texttt{stringr} \citep{Wickham2015}, we were able to collect and transform the data into a format suitable for analysis.  Our resulting dataset encompasses \Sexpr{dim(change.party)[1]} parties in \Sexpr{dim(change.election)[1]} different elections held in 31 European democracies (all 28 current EU members, plus Iceland, Norway, and Switzerland), for a total of \Sexpr{dim(change.data)[1]} party-election observations.  Our variable of interest, relabeling, is dichotomous, taking on a value of one when a preexisting party runs with a different name than it used in the previous election and zero otherwise.\footnote{\doublespacing As the example of the French Gaullists given above suggests, it may be the case that not all name changes are in fact equal: sometimes parties retain one or more words---or more rarely, the party acronym---as hints of their previous label to cue voters.  We leave exploration of these `partial' name changes for future research.} 

<<label=make_plots, echo=F, results='hide'>>==
library(scales)
library(ggplot2)

multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) {
    require(grid)
    
    # Make a list from the ... arguments and plotlist
    plots <- c(list(...), plotlist)
    
    numPlots = length(plots)
    
    # If layout is NULL, then use 'cols' to determine layout
    if (is.null(layout)) {
        # Make the panel
        # ncol: Number of columns of plots
        # nrow: Number of rows needed, calculated from # of cols
        layout <- matrix(seq(1, cols * ceiling(numPlots/cols)),
                         ncol = cols, nrow = ceiling(numPlots/cols))
    }
    
    if (numPlots==1) {
        print(plots[[1]])
        
    } else {
        # Set up the page
        grid.newpage()
        pushViewport(viewport(layout = grid.layout(nrow(layout), ncol(layout))))
        
        # Make each plot, in the correct location
        for (i in 1:numPlots) {
            # Get the i,j matrix positions of the regions that contain this subplot
            matchidx <- as.data.frame(which(layout == i, arr.ind = TRUE))
            
            print(plots[[i]], vp = viewport(layout.pos.row = matchidx$row,
                                            layout.pos.col = matchidx$col))
        }
    }
}

sum.plot.party <- ggplot(change.party, aes(x = factor(change.total))) +  
    geom_bar(aes(y = (..count..)/sum(..count..))) + 
    scale_y_continuous(labels = percent_format(), limits=c(0,.73)) +
    theme_bw() + coord_flip() +
    ylab("a. Relabelings per Party") + 
    theme(axis.title.y = element_blank()) 

sum.plot.election <- ggplot(change.election, aes(x = factor(change.total))) +  
    geom_bar(aes(y = (..count..)/sum(..count..))) + 
    scale_y_continuous(labels = percent_format(), limits=c(0,.73)) +
    theme_bw() + coord_flip() + 
    ylab("b. Relabelings per Election") + 
    theme(axis.title.y = element_blank())

sum.plot.country <- ggplot(change.country, aes(x = change.max, 
    y = reorder(country, change.max)) ) + 
    geom_point() + theme_bw() +
    xlab("c. Relabeled Parties") + 
    scale_x_continuous(labels = percent) +
    theme(axis.title.y = element_blank())
 
@

<<label=sum_tables, echo=F, results='hide'>>=
#Summary Statistics Tables
table(change.party$change.total)/length(change.party$change.total)
change.party[change.party$change.sum>=3,1:4]

table(change.election$change.total)/length(change.election$change.total)
change.election[change.election$change.sum>=3,1:4]

summary(change.country$change.max)
@


<<label=sum_plot, echo=F, fig.keep='high', include=F, fig.width=6, fig.height=6>>=
getwd()
multiplot(sum.plot.party, sum.plot.election, sum.plot.country, 
          layout = matrix(c(1, 2, 3, 3), nrow=2, byrow=F))
@

Figure~\ref{F:sum_plot} presents a summary of these data from 1945 to 2012.  Panel (a) reveals that while most European parties do conform to the expectations of parties-as-brand theorists, a substantial minority---some \Sexpr{round((1 - as.vector(table(change.party$change.total)/length(change.party$change.total))[1])*100)}\%---have relabeled themselves at least once.  Slightly over 3\% of parties, in fact, have done so three or more times.  Foremost among these is the major French party of the right, alluded to above, that began as the UG.  Currently known as \textit{Les Republicains} (LR, the Republicans), it has in its history contested elections using no fewer than seven other names.\footnote{\doublespacing In fact, the adoption of the label \textit{Les Republicains} occurred only in May 2015, too recently to be included in the data examined here.}  

The distribution of relabeled parties across elections is similar, as shown in the figure's panel (b).  Nearly a third of the democratic elections held across Europe since 1945 have included at least one party running under a new name, about one in six had two or more renamed parties, and nearly \Sexpr{round(as.vector(table(change.election$change.total)/length(change.party$change.total))[4]*100)}\% of all elections had three or more renamed parties.  The Italian elections of 1996 and 2001 were contested by six and five newly relabeled parties respectively.

Panel (c) of Figure~\ref{F:sum_plot}, however, reveals that there is considerable variation in relabeling across countries.  In Sweden, only three of the eight parties that have contested elections since 1945 have kept the same name through their entire existence: the long-dominant \textit{Socialdemokratiska Arbetarepartiet} (Social Democratic Worker's Party, S); the short-lived \textit{Ny Demokrati} (New Democracy, ND), which ran in just two elections; and the far-right nationalist \textit{Sverigedemokraterna} (Sweden Democrats, SD), which was founded in 1988.  On the other hand, none of the eleven parties of Ireland or the eight parties of Malta changed their names even once.

\begin{figure}[!htbp] 
  \caption{Party Relabeling Across European Democracies}
  \label{F:sum_plot}
  \begin{center}
    \includegraphics[width=6in]{NamesDV3-sum_plot.pdf}
  \end{center}
\end{figure}

\afterpage{\clearpage}
\newpage

\section*{Explaining Party Relabeling}

<<label=gen_ivs, echo=F, results='hide'>>==
library(plyr)

change.data <- ddply(change.data, .(country), mutate, first_cy = min(year))

old.dem <- c("Denmark", "Belgium", "Finland", "Ireland", "Luxembourg", "Netherlands", "Sweden", "United Kingdom", "Iceland", "Norway", "Switzerland") # No authoritarian interlude of more than 10 years

#Running average vote (after previous election)
change.data <- change.data[with(change.data, order(country, party, year)), ]
change.data <- ddply(change.data, .(country, party), mutate, 
                        r_avg_vote = round((cumsum(votes)-votes)/(as.numeric(factor(year))-1), 1))
change.data$r_avg_vote[with(change.data, is.nan(r_avg_vote) & (year!=first_cy | !country %in% old.dem))] <- 0 # New parties (and new democracies) have a running average of zero

# Electoral shock: previous vote relative to running average
change.data <- change.data[with(change.data, order(country, party, year)), ]
change.data <- ddply(change.data, .(country, party), mutate, 
                     prev_vote = c(0, head(votes,-1)))
change.data$prev_vote[with(change.data, 
                           prev_vote==0 & year==first_cy & country %in% old.dem)] <- NA # We don't have vote in previous election in first recorded election of uninterrupted democracies 
change.data$prev_vote_rel <- with(change.data, prev_vote - r_avg_vote)
change.data$prev_vote_rel_perc <- with(change.data, prev_vote_rel/r_avg_vote)
change.data$prev_vote_rel_perc[with(change.data, r_avg_vote==0 & 
                                        !is.na(prev_vote_rel))] <- 0 # Set equal to 0 if new party
change.data$elec_shock <- -change.data$prev_vote_rel_perc

# Lagged vote relative to running average (for reference, results not presented)
change.data <- change.data[with(change.data, order(country, party, year)), ]
change.data$vote_rel <- with(change.data, votes - r_avg_vote)
change.data <- ddply(change.data, .(country, party), mutate, 
                     vote_rel_lag = c(0, head(vote_rel,-1)))

# Party age (years since first contested (postwar) election)
change.data <- ddply(change.data, .(country, party), mutate, party_year = min(year))
change.data$party_age <- with(change.data, round(year) - round(party_year))
change.data <- change.data[with(change.data, order(country, party, year)), ]

# Brand exposure (number of postwar elections contested with name used in previous election)
change.data <- ddply(change.data, .(country, party), mutate, 
                     count = c(0,head(cumsum(change),-1)))
change.data <- ddply(change.data, .(country, party, count), mutate, name_exp = as.numeric(factor(year))-1, name_age = round(year) - round(min(year)))

# Democracy age (years since first post-war election)
change.data$dem_age <- change.data$year - change.data$first_cy

# Pedersen index of volatility
change.data$vote_diff <- with(change.data, abs(votes-prev_vote))
ped.ind <- ddply(change.data, .(country, year), summarize, pedersen = sum(vote_diff)/2)
prev.yr <- ddply(change.data, .(country, year), summarize, t = sum(votes))
prev.yr <- ddply(prev.yr, .(country), mutate, prev_year = c(NA,head(year,-1)))
prev.yr$t <- NULL
change.data <- merge(change.data, prev.yr, all.x = T)
change.data <- merge(change.data, ped.ind, by.x = c("country", "prev_year"), 
                     by.y = c("country", "year"), all.x = T)
change.data <- change.data[with(change.data, order(country, party, year)), ]

@

<<label=parlgov, echo=F, results='hide'>>==

#Get ParlGov data
parlgov_dir <- "data_dependencies"
pg.party <- read.csv(paste0(parlgov_dir,"/view_party.csv"), as.is=T)

pg.election <- read.csv(paste0(parlgov_dir,"/view_election.csv"), as.is=T)
pg.election <- merge(pg.election, read.csv(paste0(parlgov_dir,"/viewcalc_election_parameter.csv")))
pg.election <- pg.election[pg.election$election_type=="parliament",]

pg.cabinet <- read.csv(paste0(parlgov_dir,"/view_cabinet.csv"), as.is=T)
pg.cabinet <- pg.cabinet[with(pg.cabinet, order(country_name, election_date, start_date)), ]

pg.cabinet$prev_cab <- with(pg.cabinet, c(0,head(cabinet_id,-1))) 
pg.cabinet$gov_number <- with(pg.cabinet, as.numeric(cabinet_id!=prev_cab))
pg.cabinet$gov_number <- ddply(pg.cabinet, .(country_name, election_date), function(x) cumsum(x["gov_number"]))[,3]
pg.cabinet$prev_cab <- NULL

max <- ddply(pg.cabinet, .(country_name, election_date), function(x) max(x["gov_number"]))
pg.cabinet <- merge(pg.cabinet, max)
names(pg.cabinet)[length(names(pg.cabinet))] <- "gov_total"
rm(max)

pg.cabinet$p_id <- with(pg.cabinet, interaction(country_name, election_date, 
                                                party_id, drop=T))

first <- pg.cabinet[pg.cabinet$gov_number==1,c("p_id", "prime_minister", 
                                               "cabinet_party")]
names(first) <- c("p_id", "prime_minister_first", "cabinet_party_first")
pg.cabinet <- merge(pg.cabinet, first, all.x=T)
pg.cabinet$prime_minister_first[which(is.na(pg.cabinet$prime_minister_first))] <- 0
pg.cabinet$cabinet_party_first[which(is.na(pg.cabinet$cabinet_party_first))] <- 0

last <- pg.cabinet[pg.cabinet$gov_number==pg.cabinet$gov_total,c("p_id", "prime_minister", "cabinet_party")]
names(last) <- c("p_id", "prime_minister_last", "cabinet_party_last")
pg.cabinet <- merge(pg.cabinet, last, all.x=T)
pg.cabinet$prime_minister_last[which(is.na(pg.cabinet$prime_minister_last))] <- 0
pg.cabinet$cabinet_party_last[which(is.na(pg.cabinet$cabinet_party_last))] <- 0

avg <- aggregate(pg.cabinet[,c("prime_minister", "cabinet_party")], 
                 list(pg.cabinet[,"p_id"]), FUN="mean") 
names(avg) <- c("p_id", "prime_minister_avg", "cabinet_party_avg")
pg.cabinet <- merge(pg.cabinet, avg, all.x=T)

rm(first, last, avg)

pg.cabinet$prime_minister_lost <- as.numeric(with(pg.cabinet, prime_minister_avg>0 & prime_minister_last==0))
pg.cabinet$prime_minister_won <- as.numeric(with(pg.cabinet, prime_minister_avg<1 & prime_minister_last==1))
pg.cabinet$cabinet_party_lost <- as.numeric(with(pg.cabinet, cabinet_party_avg>0 & cabinet_party_last==0))
pg.cabinet$cabinet_party_won <- as.numeric(with(pg.cabinet, cabinet_party_avg<1 & cabinet_party_last==1))

pg.cabinet.by.election <- pg.cabinet[,c(17, 20, 22:32)]
pg.cabinet.by.election <- pg.cabinet.by.election[!duplicated(pg.cabinet.by.election),]

pg.election <- merge(pg.election, pg.cabinet.by.election, all.x=T)
pg.election[, 23:33][is.na(pg.election[, 23:33])] <- 0
pg <- merge(pg.election, pg.party)
rm(pg.cabinet, pg.cabinet.by.election)

pg$year<-as.numeric(gsub(pattern="^([0-9]{4})-.*", "\\1", pg$election_date))
pg[which(duplicated(pg[,c("party_id","year")])),"year"] <- pg[which(duplicated(pg[,c("party_id","year")])),"year"]+.1
pg <- pg[with(pg, order(country_name, party_name_short, year)),]

pg <- pg[pg$country_name %in% eu.plus3,]

pg$party_name_short[pg$party_name_short=="GRUENE"] <- "GRUNE"

problems <- function(x) {
    pg.c <- pg[pg$country_name==x,c("party_name_short", "party_name_english", "vote_share", "year")]
    pg.c$index <- with(pg.c, interaction(party_name_short, year))
    cd.c1 <- change.data[change.data$country==x,c("party", "votes", "year")]
    cd.c1$cd <- 1
    cd.c1$index <- with(cd.c1, interaction(party, year))
    cd.c2 <- change3[change3$country==x,c("party", "votes", "year")]
    cd.c2$index <- with(cd.c2, interaction(party, year))
    cd.c.ex <- subset(cd.c1, !(index %in% cd.c2$index))
    cd.c.ex$votes1 <- round(cd.c.ex$votes)
    pg.c.ex <- subset(pg.c, !(index %in% cd.c2$index))
    pg.c.ex$votes1 <- round(pg.c.ex$vote_share)
    c.try <- merge(cd.c.ex[,-5], pg.c.ex[,-5], by.x=c("votes1", "year"), by.y=c("votes1", "year"))

    View(c.try)
    View(cd.c.ex[cd.c.ex$votes!=0 & cd.c.ex$year>1950,])
    View(pg.c.ex[pg.c.ex$votes!=0 & pg.c.ex$year>1950,])
    View(pg.c)
    
    names(table(change.data$party[change.data$country==x]))[!names(table(change.data$party[change.data$country==x])) %in% names(table(change3$party[change3$country==x]))]
}

# Austria done
pg$party_name_short[pg$country_name=="Austria" & pg$party_name_short=="K/L"] <- "KPO"

# Belgium done
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="BSP-PSB"] <- "BSP/PSB"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="CVP"] <- "CVP/PSC"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="Ecolo"] <- "ECOLO"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="AGL-Gr"] <- "GROEN"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="KPB-PCB"] <- "KPB/PCB"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="LD"] <- "LDD"
pg$party_name_short[pg$country_name=="Belgium" & pg$party_name_short=="Pp"] <- "PP"

# Bulgaria Parlgov data starts in 1991; done
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="ATA"] <- "ATAKA"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="KE"] <- "KR"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="BKP"] <- "KPB"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="KzB"] <- "KB"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="DL"] <- "BL"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="ODS" & pg$year==1991] <- "SDS-T"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="ZS-AS"] <- "BZNS-AS"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="ZNS"] <- "BZNS"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="DG"] <- "DG-VMRO"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="PPS"] <- "RZS"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="BNS"] <- "NS"
pg$party_name_short[pg$country_name=="Bulgaria" & pg$party_name_short=="BC"] <- "SK"

# No data on Croatia in ParlGov

# Cyprus Parlgov data starts in 1976; done
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="ADK"] <- "ADIK"
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="A/D/E"] <- "DP"
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="EK"] <- "EVROKO"
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="EVROKO"] <- "EK"
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="ED"] <- "EDI"
pg$party_name_short[pg$country_name=="Cyprus" & pg$party_name_short=="NO"] <- "NEO"

# Czech Republic done
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="DU"] <- "DEU"
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="HSD/SMS"] <- "HSD-SMS"
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="US/DEU"] <- "US-DEU"
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="KSCM" & pg$year==1992] <- "LB"
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="KDU/CSL"] <- "KDU-CSL"
pg$party_name_short[pg$country_name=="Czech Republic" & pg$party_name_short=="SPR/RSC"] <- "SPR-RSC"

# Denmark done
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="RF"] <- "DR"
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="Sd"] <- "S"
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="KrF"] <- "KRF"
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="FrP"] <- "FRP"
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="Enh"] <- "EL"
pg$party_name_short[pg$country_name=="Denmark" & pg$party_name_short=="NLA"] <- "NA"

# Estonia done
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="EK"] <- "K"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="ResP"] <- "RP"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="EPL"] <- "EPPL"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="V"] <- "VV"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="OIG"] <- "O"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="MKE"] <- "MKOE"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="EKK"] <- "KE"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="RKI/ERSP"] <- "IERSP"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="EKo"] <- "EK"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="RKI"] <- "I"
pg$party_name_short[pg$country_name=="Estonia" & pg$party_name_short=="ERe"] <- "RE"

# France done
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="G"] <- "UG"
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="IR"] <- "RI"
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="MF"] <- "MPF"
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="PRL"] <- "M"
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="V"] <- "LV"
pg$party_name_short[pg$country_name=="France" & pg$party_name_short=="PRR/RS"] <- "RGR"

# Finland done
pg$party_name_short[pg$country_name=="Finland" & pg$party_name_short=="L"] <- "LIB"
pg$party_name_short[pg$country_name=="Finland" & pg$party_name_short=="SP-P"] <- "PS"
pg$party_name_short[pg$country_name=="Finland" & pg$party_name_short=="SSDP"] <- "SDP"
pg$party_name_short[pg$country_name=="Finland" & pg$party_name_short=="RKP-SFP"] <- "SFP"
pg$party_name_short[pg$country_name=="Finland" & pg$party_name_short=="Deva"] <- "DEVA"

# Germany done
pg$party_name_short[pg$country_name=="Germany" & pg$party_name_short=="Grue"] <- "GRUNE"
pg$party_name_short[pg$country_name=="Germany" & pg$party_name_short=="Linke"] <- "LINKE"
pg$party_name_short[pg$country_name=="Germany" & pg$party_name_short=="Rep"] <- "REP"
pg$party_name_short[pg$country_name=="Germany" & pg$party_name_short=="Zentrum"] <- "ZENTRUM"

# Greece Parlgov data starts in 1974; done
pg$party_name_short[pg$country_name=="Greece" & pg$party_name_short=="SRA"] <- "SYRIZA"
pg$party_name_short[pg$country_name=="Greece" & pg$party_name_short=="POLAN"] <- "POLA"
pg$party_name_short[pg$country_name=="Greece" & pg$party_name_short=="AE"] <- "ANEL"
pg$party_name_short[pg$country_name=="Greece" & pg$party_name_short=="LS-CA"] <- "ChA"

# Hungary done
pg$party_name_short[pg$country_name=="Hungary"] <- gsub(pattern="Fides.*", replacement="FIDESZ", x= pg$party_name_short[pg$country_name=="Hungary"])
pg$party_name_short[pg$country_name=="Hungary"] <- toupper(pg$party_name_short[pg$country_name=="Hungary"])
pg$party_name_short[pg$country_name=="Hungary" & pg$party_name_short=="MM"] <- "MKMP"
pg$party_name_short[pg$country_name=="Hungary" & pg$party_name_short=="MIEP-JOBBIK"] <- "JOBBIK"

# Iceland done
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="A"] <- "AF"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Ab"] <- "AB"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="B"] <- "BF1"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Bf"] <- "BF2"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="BJ"] <- "SDU"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="F"] <- "FSF"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Ff"] <- "FF"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Graen"] <- "VG"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Sam"] <- "S"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Sj"] <- "SSF"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Sk"] <- "SK"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Sfvm"] <- "SF"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="So"] <- "AB"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="ThFf"] <- "TV"
pg$party_name_short[pg$country_name=="Iceland" & pg$party_name_short=="Thva"] <- "NP"

# Ireland done
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="Lab"] <- "LAB"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="CnP"] <- "CnaP"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="CnT"] <- "CnaT"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="DLP"] <- "DL"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="Greens"] <- "GP"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="Lab"] <- "LAB"
pg$party_name_short[pg$country_name=="Ireland" & pg$party_name_short=="Lab"] <- "LAB"

# Italy done
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="DL-M"] <- "DL"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="IdV"] <- "IDV"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="LDFT"] <- "LD-FT"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="PSUP"] <- "PSIUP"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="PdCI"] <- "PDCI"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="R"] <- "RAD"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="FdV"] <- "VERDI"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="LR"] <- "RETE"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="MpA"] <- "MPA"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="FUQ"] <- "UQ"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="IPdL"] <- "PDL"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="Ulivo"] <- "ULIVO"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="UdC"] <- "UDC"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="LUP"] <- "PRODI"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="CCD/CDU"] <- "CCD-CDU"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="LSLA"] <- "SA"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_english=="Segni Pact"] <- "SEGNI"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="PDIUM"] <- "PNM"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="PpP"] <- "PRODI"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="Giras"] <- "GS"
pg$party_name_short[pg$country_name=="Italy" & pg$party_name_short=="PdUP"] <- "DP"

# Latvia done
pg$party_name_short[pg$country_name=="Latvia" & pg$party_name_short=="TKL-ZP"] <- "TKL"
pg$party_name_short[pg$country_name=="Latvia" & pg$party_name_short=="KPSS"] <- "LKP"
pg$party_name_short[pg$country_name=="Latvia" & pg$party_name_short=="LSA"] <- "LSDA"
pg$party_name_short[pg$country_name=="Latvia" & pg$party_name_short=="LZS/KDS"] <- "KDS"

# Lithuania done
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_english=="Lithuanian Liberty Union"] <- "LLL"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="AWPL"] <- "LLRA"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="SK"] <- "S"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="L/L/L"] <- "LKDP"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="BSDK"] <- "SDK"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="VP/NDP"] <- "VNDS"
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="TT-LDP"] <- "TT" 
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="RPk"] <- "TT" 
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="JL"] <- "LTJS" 
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="JL/PKS"] <- "LTJS" 
pg$party_name_short[pg$country_name=="Lithuania" & pg$party_name_short=="LLRA"] <- "AWPL" 

# Luxembourg done
pg$year[pg$country_name=="Luxembourg" & pg$year==1968] <- 1969 
pg$party_name_short[pg$country_name=="Luxembourg" & pg$party_name_short=="Greng" & pg$year==1984] <- "GAP"
pg$party_name_short[pg$country_name=="Luxembourg" & pg$party_name_short=="Greng"] <- "GRÉNG" 
pg$party_name_short[pg$country_name=="Luxembourg" & pg$party_name_short=="DL"] <- "LÉNK" 
pg$party_name_short[pg$country_name=="Luxembourg" & pg$party_name_short=="MPI"] <- "MIP" 

# Malta done
pg$party_name_short[pg$country_name=="Malta" & pg$party_name_short=="MLP"] <- "PL" 
pg$party_name_short[pg$country_name=="Malta" & pg$party_name_short=="DA"] <- "AD" 
pg$party_name_short[pg$country_name=="Malta" & pg$party_name_short=="CWP"] <- "PHN" 
pg$party_name_short[pg$country_name=="Malta" & pg$party_name_short=="DNP"] <- "PDN" 

# Netherlands done
pg$party_name_short[pg$country_name=="Netherlands" & pg$party_name_short=="Bp"] <- "BP" 

# Norway done
pg$party_name_short[pg$country_name=="Norway" & pg$party_name_short=="Kp"] <- "NKP" 
pg$party_name_short[pg$country_name=="Norway" & pg$party_name_short=="Sp"] <- "SP" 
pg$party_name_short[pg$country_name=="Norway" & pg$party_name_short=="KrF"] <- "KRF" 
pg$party_name_short[pg$country_name=="Norway" & pg$party_name_short=="Fr"] <- "FRP" 
pg$party_name_short[pg$country_name=="Norway" & pg$party_name_short=="Kp"] <- "NKP" 

# Poland done
pg$party_name_short[pg$country_name=="Poland" & pg$party_name_short=="UD"] <- "DU" 
pg$party_name_short[pg$country_name=="Poland" & pg$party_name_short=="PCD"] <- "PChD" 
pg$party_name_short[pg$country_name=="Poland" & pg$party_name_short=="O"] <- "KKWO" 

# Portugal done

# Romania done
pg$party_name_short[pg$country_name=="Romania" & pg$party_name_short=="etnice"] <- "Minorities" 
pg$party_name_short[pg$country_name=="Romania" & pg$party_name_short=="PNT-CD"] <- "PNTCD" 
pg$party_name_short[pg$country_name=="Romania" & pg$party_name_short=="AUL"] <- "AUR"
pg$party_name_short[pg$country_name=="Romania" & pg$party_name_short=="PAC" & pg$year==1996] <- "ANL" 

# Slovakia done
pg$party_name_short[pg$country_name=="Slovakia" & pg$party_name_short=="SMK-MKP"] <- "MKP" 
pg$party_name_short[pg$country_name=="Slovakia" & pg$party_name_short=="DuS"] <- "DU" 
pg$party_name_short[pg$country_name=="Slovakia" & pg$party_name_short=="SaS"] <- "SAS" 
pg$party_name_short[pg$country_name=="Slovakia" & pg$party_name_short=="ESWS"] <- "MKDH-ES" 
pg$party_name_short[pg$country_name=="Slovakia" & pg$party_name_short=="Smer"] <- "SMER-SD" 

# Slovenia
pg$party_name_short[pg$country_name=="Slovenia" & pg$party_name_short=="DS"] <- "DSS" 
pg$party_name_short[pg$country_name=="Slovenia" & pg$party_name_short=="DeSUS"] <- "DESUS" 
pg$party_name_short[pg$country_name=="Slovenia" & pg$party_name_short=="Zares"] <- "ZARES" 
pg$party_name_short[pg$country_name=="Slovenia" & pg$party_name=="Social Liberal Party"] <- "DSS" 
pg$party_name_short[pg$country_name=="Slovenia" & pg$party_name_short=="SsS"] <- "SSS" 

# Spain done
pg$party_name_short[pg$country_name=="Spain" & pg$party_name_short=="PNV"] <- "EAJ-PNV" 
pg$party_name_short[pg$country_name=="Spain" & pg$party_name_short=="UPyD"] <- "UPD" 

# Sweden done
pg$party_name_short[pg$country_name=="Sweden" & pg$party_name_short=="SAP"] <- "S" 
pg$party_name_short[pg$country_name=="Sweden" & pg$party_name_short=="NyD"] <- "ND" 

# Switzerland done
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="CsP-PCS"] <- "CSP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="NA-AN"] <- "NA" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="SVP"] <- "BGB" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="SVP-UDC"] <- "SVP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="CVP-PDC"] <- "CVP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="EVP-PEP"] <- "EVP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="FDP-PRD"] <- "FDP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="SP-PS"] <- "SP" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="LdU-ADI"] <- "LdU" 
pg$party_name_short[pg$country_name=="Switzerland" & pg$party_name_short=="SVP"] <- "BGB" 

# United Kingdom done
pg$party_name_short[pg$country_name=="United Kingdom" & pg$party_name_short=="Con"] <- "CON" 
pg$party_name_short[pg$country_name=="United Kingdom" & pg$party_name_short=="C/NL"] <- "CON" 
pg$party_name_short[pg$country_name=="United Kingdom" & pg$party_name_short=="Lib"] <- "LIB" 
pg$party_name_short[pg$country_name=="United Kingdom" & pg$party_name_short=="Alliance"] <- "SDP-LIB" 
pg$party_name_short[pg$country_name=="United Kingdom" & pg$party_name_short=="Plaid"] <- "PC" 


######
#Merge ParlGov data with Parties-and-Elections data
change <- merge(change.data, pg, by.x=c("country","name1", "year"), by.y=c("country_name", "party_name_short", "year"))

for(i in 2:6) {   
    temp <- merge(change.data, pg, by.x=c("country",paste0("name",i), "year"), by.y=c("country_name", "party_name_short", "year"))
    change <- rbind(change, temp)
}
rm(temp)

abv.ches <- read.csv("../CHES/abv_ches.csv")
abv.ches$year <- NULL
abv.ches <- abv.ches[!duplicated(abv.ches),]
pg2 <- merge(pg, abv.ches)
pg2 <- pg2[pg2$party_name_short!=pg2$abv_ches,]
pg2$party_name_short <- NULL

change2 <- merge(change.data, pg2, by.x=c("country","name1", "year"), by.y=c("country_name", "abv_ches", "year"))

for(i in 2:6) {   
    temp <- merge(change.data, pg2, by.x=c("country",paste0("name",i), "year"), by.y=c("country_name", "abv_ches", "year"))
    change2 <- rbind(change2, temp)
}
rm(temp)

change3 <- rbind(change, change2)

change3 <- change3[which(!duplicated(change3[,1:4])),]

change3$c_party <- with(change3, paste(country_name_short, name1, sep="."))
change3$year <- as.numeric(change3$year)

enep.lag <- ddply(change3, .(country, year), summarize, enep_lag = mean(enp_votes))
change3 <- merge(change3, enep.lag, by.x = c("country", "prev_year"), 
                 by.y = c("country", "year"), all.x = T)
change3$enep_lag[is.na(change3$pedersen)] <- NA # For consistent sample
@

<<label=es, echo=F, results='hide'>>==
# Get electoral reform data
es_dir <- "data_dependencies"
es <- read.csv(paste0(es_dir,"/es_data-v2_0_1.csv"), as.is=T)

es$country[es$country=="Greek Cyprus"] <- "Cyprus"
es$country[es$country=="West Germany"] <- "Germany"
es$country[es$country=="Sweden "] <- "Sweden"
es <- es[with(es, order(country, year, date)), ]

es <- es[es$country %in% eu.plus3 & es$presidential==0, ]

es$lag_country <- with(es, c(0,head(country,-1)))

es$year_lag <- with(es, c(0,head(year,-1)))
es$year[es$year==es$year_lag & es$lag_country==es$country] <- es$year[es$year==es$year_lag & es$lag_country==es$country] + .1

es$elecrule_lag <- with(es, c(0,head(elecrule,-1))) 
es$avemag_lag <- with(es, c(0,head(tier1_avemag,-1)))
es$es_reform <- as.numeric((es$elecrule!=es$elecrule_lag | abs(es$avemag_lag-es$tier1_avemag)>2) & es$lag_country==es$country)
es$es_reform_lag <- with(es, c(0,head(es_reform,-1)))
es$es_reform_lag[es$lag_country!=es$country] <- NA
es$smd <- as.numeric(es$legislative_type==1)
es$pr <- as.numeric(es$legislative_type==2)
es$mix <- as.numeric(es$legislative_type==3)

es1 <- es[,c("country", "year", "es_reform", "es_reform_lag", "smd", "pr", "mix")]
change3 <- merge(change3, es1, all.x=T)
change3$es_reform[is.na(change3$es_reform)] <- 0
@

The Nordsieck data that we collected contains only one additional piece of information: each party's share of the vote in each election.  To provide a dataset that incorporated a range of additional characteristics about parties and the elections they contested, these data were then merged with the ParlGov database, a process that required a great deal of careful recoding due to the latter's aforementioned inattention to the names parties employed as well as more prosaic differences in how these names were recorded.  Small parties that won less than 1\% of the vote in an election frequently (but not always) go unrecorded in the ParlGov data, and ParlGov also excludes information on Croatia.  For these reasons, the merged dataset includes just \Sexpr{dim(change3)[1]} observations, that is, about \Sexpr{round((dim(change3)[1]/dim(change.data)[1])*100)}\% of the Nordsieck data.


\textbf{Brand Exposure}.  To test the brand-exposure hypothesis's claim that long-established party names should be less likely to be discarded than newer ones, we counted the number of times a party's pre-existing name had been put before the voters in elections before the current contest.  For new parties and parties that had just relabeled themselves in the past election, this variable takes on a value of zero.  On the other hand, nearly 1\% of the parties had used their names twenty or more times previously.  The median value of brand exposure in this sample is three.\footnote{\doublespacing Despite the readily evident skew in this variable, we found no evidence for a nonlinear effect of brand exposure on party relabeling; see Model A1 in Table A1 of the web appendix for these results.  Operationalizing brand exposure as the age of the party's name in years yields substantively similar results to those presented.}

\textbf{Electoral Shock}.  The electoral-shock hypothesis of party relabeling maintains that parties which suffered a disappointing result at the polls become more likely to rename themselves in the next election.  To measure such shocks, we use the difference between each party’s share in the previous election and its average vote share in the elections it contested before that point, divided by that average vote share, and multiplied by -1 so that losses are positive and gains are negative.  The difference between a party's most recent performance and its previous average vote share effectively captures the change in party fortunes rather than their level (cf. Fairbrother 2014), while normalizing this difference by the party's average ensures we distinguish between the very different expectations that a loss of 2 percentage points has for a party that had averaged 40\% of the vote and one that had typically won 4\% of the vote. The highest decile of parties by electoral shock lost in the previous election more than 37\% of their average vote share to that time; on the other hand, the lowest decile experienced negative shocks (that is, gains) of more than 41\% of their previous average performance. 

\textbf{Party System Weakness}.  As the defining characteristic of weak party systems is high levels of electoral volatility, we operationalize party-system weakness using the Pedersen index of volatility in the previous election: half of the sum of the gains and losses in the vote shares of all parties \citep[4]{Pedersen1979}.  The median value of this variable across all post-war elections was 9.35\%.  Of course, there was considerable variation in the strength of European party systems in the post-war period: 10\% of elections exhibited party systems at least as weak as that of Belgium after the 1981 election, when 43.5\% of the vote shifted among parties, and 10\% of elections exhibited party systems at least as strong as that of Finland after the 1979 election, when only 4.6\% of votes changed hands.

\textbf{Control Variables}.  There are a number of other variables that are linked, either conceptually or empirically, to those used to test these three theories and that are therefore important to include as controls.  The first of these is the age of the party: it is possible that parties that have used the same name for many elections become less likely to rebrand not because their brand has had more exposure to the electorate but rather because the party itself has become more institutionalized over the years.  Party age is measured the number of years since the first election each party contested in the post-war era, and this variable is logged to take into account the likely diminishing marginal effect of additional years.

A second plausibly important control variable is party size.  Larger parties may be less likely to shed their names than smaller ones, not for how long the voting public has been exposed to the brand, but simply because their brand has proven more successful.  Party size is measured as each party's average vote share in the elections it had to that point contested.  

For similar reasons, parties may be less likely to rename themselves when they are part of the incumbent government.  The ruling party is able to effectively increase its visibility among the public and is given ample opportunities and resources to offer the electorate some benefits for which it can claim credit later \citep[e.g.,][]{Erikson1971, Mayhew1974, Collie1981, Cox1996, Scheiner2005}. Heightened visibility in particular means that the incumbent party has a better chance to construct some form of reputation or image associated with its label, accruing brand value to it. 

Finally, in larger party systems, elections are more crowded with entrants than in smaller party systems \citep[9]{West2013}. Parties in more fragmented systems therefore have more competitors, and they are in a situation where they might be expected to employ a more aggressive marketing strategy, perhaps including party relabeling, to attract more voters than those in a system with only a few effective parties.  Further, when voters face a larger number of smaller parties, they may have difficulty figuring out which party stands for which, inundated with party labels that provide weaker information cues \citep{Scheiner2005}.  How this circumstance affects the propensity to relabel is an open question.  The relative lack of brand value in their labels may be argued to heighten party's need to retain the same label to provide any information to voters at all, or it may lower the costs of choosing a new name.  More importantly for our purposes, electoral pluralism and volatility---the \emph{sine qua non} of party system weakness---are positively related empirically.  This makes it crucial to distinguish any effects of these two phenomena.  We measure the size of the party system with the effective number of electoral parties in the previous election.

We also tested whether democratic age or electoral system type affected parties' propensity to adopt new names.  These variables proved to have little independent explanatory power and did not affect the conclusions drawn regarding our variables of interest; see Table~\ref{T:a.table2} in the web appendix.  A potential confound that we were only partially successful in addressing is the role of party splits and mergers.  Offshoots are the easiest of the cases but also the most trivial: they are considered in our data to be new parties, and as such are not coded as having changed names.  It is plausible that their complements, parties that see a faction leave to form a new party, would be more likely to relabel themselves, but data to identify such parties within the full sample of countries and elections considered here were unavailable.  Mergers are similarly difficult to identify consistently. One feasible, if not fully satisfying, operationalization of mergers comes from ParlGov's coding of party families, which includes a category for `electoral alliances.' Including a dummy variable identifying mergers this way in Model 4 of Table~\ref{T:models.t1} does find support for the hypothesis that mergers make parties more likely to relabel, but it also shows that the inclusion of this variable does not substantively affect the results we report.

<<label=models, echo=F, results='hide'>>==
c.data <- change3
c.data$election <- c.data$election_id
c.data$cparty <- c.data$c_party
write.csv(c.data, "c_data.csv", row.names=F)

library(lme4)

base.model <- "log1p(party_age) + 
                r_avg_vote + 
                cabinet_party_last + 
                enep_lag"

# base model
t1m0 <- glmer(as.formula(paste("change ~", base.model, " +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# brands
t1m1 <- glmer(as.formula(paste("change ~", base.model, "+ name_exp +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# shocks
t1m2 <- glmer(as.formula(paste("change ~", base.model, "+ elec_shock +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# volatility 
t1m3 <- glmer(as.formula(paste("change ~", base.model, "+ pedersen +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# all three 
t1m4 <- glmer(as.formula(paste("change ~", base.model, "+ name_exp + elec_shock + pedersen +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# alternate operationalizations of brand exposure (not presented)
t1m4a <- glmer(as.formula(paste("change ~", base.model, "+ name_age + elec_shock + pedersen +
                 (1|cparty) + (1|election) + (1|country)")),
               data = c.data, family = "binomial", nAGQ = 0)

t1m4b <- glmer(as.formula(paste("change ~", base.model, "+ log1p(name_age) + elec_shock + pedersen +
                 (1|cparty) + (1|election) + (1|country)")),
               data = c.data, family = "binomial", nAGQ = 0)
@

%\end{spacing}

<<label=hlm.table, echo=F, results='asis'>>== 
library(texreg)

format.for.texreg <- function(model = NULL) {
    model.res <- extract(model, include.aic=F, include.bic=F, include.deviance=F, naive=T)
    model.res@gof <- model.res@gof[-9]
    model.res@gof.names <- model.res@gof.names[-9]
    model.res@gof.decimal <- model.res@gof.decimal[-9]
    return(model.res)
}

models.t1 <- list()
for (i in 1:4) {
    models.t1[i] <- format.for.texreg(get(paste0("t1m", i)))
}

vars <- c("Party Age, Logged", "Party Size", "Incumbent Government", "Electoral Pluralism",  "Brand Exposure", "Electoral Shock", "Party System Weakness")
 

# Three Theories
texreg(l=models.t1, label="T:models.t1", 
       caption="Predicting Party Relabeling, Cross-Classified Hierarchical Models",
       stars = c(0.001, 0.01, 0.05, 0.1), symbol="\\dagger",
       caption.above=T, 
       custom.coef.names=c("Intercept", vars),  
       custom.gof.names = c(NA, "Party-Elections", "Parties", "Elections", "Countries", "Variance: Parties", "Variance: Elections", "Variance: Countries"),
       reorder.coef = c(6:8, 2:5, 1)
)
@


<<label=fd, echo=F, results='hide'>>==
sims.glmer <- function(mod = NULL, n = 10000, seed = 324) {
    # H/T http://www.quantumforest.com/2011/10/simulating-data-following-a-given-covariance-structure/
    varcov <- matrix(vcov(mod)@x, nrow = vcov(mod)@Dim[1])
    betas <- fixef(mod)
    se <- diag(chol(diag(diag(varcov), length(diag(varcov)))))
    
    L <- chol(varcov)
    n.vars <- dim(L)[1]
    
    set.seed(seed)
    sims <- t(t(L) %*% matrix(rnorm(n.vars*n), nrow=n.vars, ncol=n))
    
    for (v in 1:ncol(sims)) {
        sims[,v] <- sims[,v] + as.numeric(betas[v])
    }
    
    sims <- as.data.frame(sims)
    names(sims) <- names(betas)
    names(sims)[1] <- "constant"
    return(sims)
}

# glmer.logit.fd, which calculates first differences when all other variables are at their means, is used only for comparison to glmer.logit.fd2, which uses the sample mean of the DV as the baseline instead to compensate for the underprediction that occurs when the DV is relatively rare

glmer.logit.fd <- function(mod = NULL, sdX2 = FALSE, use.mode = FALSE, ci = .95) {
    mod.sims <- sims.glmer(get(mod))
    mod <- get(mod)
    
    df <- cbind( constant = 1, mod@frame[, 2:(length(mod@frame) - length(mod@cnms))])
    vars.mean <- data.frame(t(colMeans(df)))
    vars <- names(df)
    if (use.mode == TRUE) {
        for(i in seq(length(vars))) {
            tab <- table(df[, vars[i]])
            if (length(tab) == 2) {
                vars.mean[i] <- as.numeric(names(tab[which(tab == max(tab))]))
            }
        }
    }
    fd <- data.frame(mean = t(vars.mean), min = NA, max = NA, fd = NA, fd.lb = NA, fd.ub = NA)
    for(i in seq(length(vars))) {
        fake.data <- data.frame(vars.mean[, !names(vars.mean) %in% vars[i]], 
                                x = c(min(df[vars[i]]), max(df[vars[i]])))
        fd[i, "min"] <- min(df[vars[i]])
        fd[i, "max"] <- max(df[vars[i]])            
        if (sdX2 == TRUE & length(table(df[, vars[i]])) > 2) {
            fake.data$x <- c(mean(df[, vars[i]]) - sd(df[, vars[i]]), 
                             mean(df[, vars[i]]) + sd(df[, vars[i]]))
            fd[i, "min"] <- mean(df[, vars[i]]) - sd(df[, vars[i]])
            fd[i, "max"] <- mean(df[, vars[i]]) + sd(df[, vars[i]])  
        }
        names(fake.data)[length(names(fake.data))] <- vars[i]
        sims.t <- mod.sims[c(vars[!vars %in% vars[i]], vars[i])]
        t <- plogis(data.matrix(fake.data) %*% t(data.matrix(sims.t)))
        diff <- t[2,] - t[1,]
        
        fd[i, 4] <- mean(diff)*100
        fd[i, 5:6] <- quantile(diff, probs = c(0.025, 0.975))*100
    }
    return(fd)
}

glmer.logit.fd2 <- function(model = NULL, sdX2 = FALSE, use.mode = FALSE, ci = .95) {
    mod.sims <- sims.glmer(get(model))
    mod <- get(model)
    
    df <- cbind( constant = 1, mod@frame[, 2:(length(mod@frame) - length(mod@cnms))])
    vars.mean <- data.frame(t(colMeans(df)))
    vars <- names(df)
    if (use.mode == TRUE) {
        for(i in seq(length(vars))) {
            tab <- table(df[, vars[i]])
            if (length(tab) == 2) {
                vars.mean[i] <- as.numeric(names(tab[which(tab == max(tab))]))
            }
        }
    }
    fd <- data.frame(mean = t(vars.mean), min = NA, max = NA, fd = NA, fd.lb = NA, fd.ub = NA)
    for(i in seq(length(vars))) {
        fake.data <- data.frame(x = c(min(df[vars[i]]), max(df[vars[i]])))
        fd[i, "min"] <- min(df[vars[i]])
        fd[i, "max"] <- max(df[vars[i]])            
        if (sdX2 == TRUE & length(table(df[, vars[i]])) > 2) {
            fake.data$x <- c(mean(df[, vars[i]]) - sd(df[, vars[i]]), 
                             mean(df[, vars[i]]) + sd(df[, vars[i]]))
            fd[i, "min"] <- mean(df[, vars[i]]) - sd(df[, vars[i]])
            fd[i, "max"] <- mean(df[, vars[i]]) + sd(df[, vars[i]])  
        }
        names(fake.data) <- vars[i]
        sims.t <- mod.sims[vars[i]]
        pp <- t(qlogis(mean(mod@frame$change)) - fd[i, "mean"]*data.matrix(sims.t)) 
        pp <- rbind(pp, pp)
        pp <- plogis(pp + data.matrix(fake.data) %*% t(data.matrix(sims.t)))
        diff <- pp[2,] - pp[1,]
        
        fd[i, 4] <- mean(diff)*100
        fd[i, 5:6] <- quantile(diff, probs = c(0.025, 0.975))*100
    }
    return(fd)
}

t1m4.fd.range <- glmer.logit.fd2("t1m4")
t1m4.fd.sdX2 <- glmer.logit.fd2("t1m4", sdX2 = T)

fd.cust <- function(model = NULL, iv = NULL, range = c(0, 1), digits=0) {
    mod.sims <- sims.glmer(get(model))
    mod <- get(model)
    sims.t <- mod.sims[iv]
    fake.data <- data.frame(iv = range)
    pp <- t(qlogis(mean(mod@frame$change)) - mean(mod@frame[[iv]])*data.matrix(sims.t)) 
    pp <- rbind(pp, pp)
    pp <- plogis(pp + data.matrix(fake.data) %*% t(data.matrix(sims.t)))
    diff <- pp[2,] - pp[1,]
    fd <- mean(diff)*100
    fd <- c(fd, quantile(diff, probs = c(0.025, 0.975))*100)
    out <- paste(round(fd[1], digits), "percentage points (95\\% C.I.,", round(fd[2], digits), "to", round(fd[3], digits),"points)")
    out
}

@

<<label=fdplot, echo=F, results='hide'>>=

t1m4.fd <- rbind(data.frame(iv = row.names(t1m4.fd.sdX2)[c(6:8, 2:5)], 
                          t1m4.fd.sdX2[c(6:8, 2:5), 4:6], 
                          range = "Over 2 Standard Deviations",
                          no = 1:length(row.names(t1m4.fd.sdX2)[-1])),
               data.frame(iv = row.names(t1m4.fd.range)[c(6:8, 2:5)], 
                          t1m4.fd.range[c(6:8, 2:5), 4:6], 
                          range = "Over Full Range",
                          no = 1:length(row.names(t1m4.fd.range)[-1])) 
               )

n.vars <- length(row.names(t1m4.fd.sdX2)[-1])

fd.plot <- ggplot(data = t1m4.fd, aes(y = no, x = fd)) +
    geom_point() + geom_errorbarh(aes(xmin = fd.lb, xmax = fd.ub, height=0)) +
    ylab("") + xlab("") + theme_bw() + 
    scale_y_reverse(breaks = 1:n.vars, labels = vars[c(5:7, 1:4)]) +
    theme(legend.title=element_blank(), legend.position=c(.15, .95)) +
    geom_vline(xintercept=c(0), linetype="dotted") + 
    facet_grid(. ~ range, scales="free") +
    scale_x_continuous(breaks = seq(-60, 50, by = 10))

pdf(file="fd_plot.pdf", width=8, height = 4)
plot(fd.plot)
graphics.off()

@

To analyze these data appropriately, we must take into account their hierarchical structure.  Our unit of analysis is the party-election.  Presumably, some parties have characteristics that make them more likely than others to engage in relabeling; to the extent that these factors remain unobserved, the errors associated with observations of the same party will not be independent of each other.  Similarly, some elections may be particularly likely to prompt relabeling than others, and as noted above, some countries' parties appear to be more likely to relabel than those of other countries.  Neglecting this hierarchical structure would yield underestimated standard errors \citep{Steenbergen2002}.  Because party-elections are nested in both parties and elections, neither of these two levels are nested within the other, and both are nested within countries, we estimate a cross-classified hierarchical model with a separate error term for each party, election, and country.  Further, as our dependent variable is dichotomous, we employ logistic regression.

\begin{figure}[htbp] 
  \caption{First Differences in Predicted Probability of Party Relabeling}
  \label{F:fd}
  \begin{center}
    \includegraphics[width=5.25in]{fd_plot.pdf}
  \end{center}
  \begin{footnotesize}
  \begin{tabular}{p{.1in} p{4.75in}}
  & \emph{Note}: Based on results reported in Table~\ref{T:models.t1}, Model 4, calculated from a baseline probability equal to the sample mean.
  \end{tabular}
  \end{footnotesize}
\end{figure}

The results appear in Table~\ref{T:models.t1}.  The first three models test the predictions generated by each of the three hypotheses of party relabeling singly: along with the battery of control variables, Model 1 includes brand exposure as a predictor, Model 2 electoral shocks, and Model 3 party system weakness as measured by the Pedersen index of electoral volatility.  Model 4 tests all three hypotheses together.  Figure~\ref{F:fd} displays the first differences in the predicted probability of party relabeling, calculated from the results of Model 4, with the sample mean of the dependent variable used as a baseline.  The left panel displays the estimated changes in the predicted probability as the independent variables move from one standard deviation below to one standard deviation above their mean values; the right panel shows these estimated changes over the independent variables' full observed ranges.

According to these models, each of the hypotheses is supported.  First, there is considerable support for the brand-exposure hypothesis that the longer a party has employed a brand, the less prone that party will be to discard it.  In both Model 1 and 4, the cofficient estimate for this variable is negative and statistically significant.  This estimated effect is substantively significant as well: according to the results of Model 4, the predicted probability that the most-experienced party names observed, those like that of Denmark's \emph{Radikale Venstre} (Radical Left, RV) that have been used in \Sexpr{max(c.data$name_exp)} previous elections, are replaced is \Sexpr{round(-1*t1m4.fd.range["name_exp", "fd"])} percentage points (with a 95\% confidence interval of \Sexpr{round(-1*t1m4.fd.range["name_exp", "fd.ub"])} to \Sexpr{round(-1*t1m4.fd.range["name_exp", "fd.lb"])} points) lower than a party name put before the voters just once before, assuming otherwise typical circumstances.  Moreover, this result is not simply an artifact of newer, and perhaps less institutionalized, parties being more likely to discard their names.  In fact, when brand exposure is included in the model, it is \emph{older} parties that are estimated to be more likely to relabel themselves.%\footnote{\doublespacing This result may be understood in that, for a younger party and an older one to have the same brand exposure, the older one has had to have rebranded itself at least once in the past and so has set a precedent for the practice.}

<<label=pvr.fd, echo=F, results='hide'>>==
pvr.fd <- gsub("//", "/", fd.cust("t1m4","elec_shock", c(0, c.data$elec_shock[c.data$cparty=="BGR.SDS" & c.data$year==2009]), digits=1))

pvr.fd1 <- gsub("//", "/", fd.cust("t1m4","elec_shock", c(0, c.data$elec_shock[c.data$cparty=="BGR.SDS" & c.data$year==2009]), digits=1))
@

Next, we turn to the evidence regarding the electoral-shock hypothesis of party relabeling.  Models 2 and 4 indicate that parties are, as this hypothesis predicts, more likely to relabel after suffering a setback at the polls.  Compared to a vote share in line with a party's previous average, a drubbing in the last election like that suffered by the Bulgarian party now known as \emph{Sayuz na Demokratichnite Sili} (Union of Democratic Forces, SDS) in 2005, when its tally fell 21.1 points---73\% of its prior average vote share---increases the predicted probability of a name change in the next election by \Sexpr{pvr.fd}, given otherwise typical circumstances.  (As it turns out, the SDS did in fact rebrand itself by running in 2009 under the banner of the \emph{Sinyata Koalitsia} (Blue Coalition, SK).) This result provides support for the view that parties relabel themselves in response to electoral shocks.


<<label=ped.fd, echo=F, results='hide'>>==
ped.fd <- gsub("//", "/", fd.cust("t1m4","pedersen", c(5, 50)))
@

Finally, the models of Table~\ref{T:models.t1} also show support for the party-system-weakness hypothesis.  Volatility, the defining characteristic of weakly institutionalized party systems, is indeed a strong predictor of party name changes.  In fact, when the Pedersen index of volatility reaches 50\%, as it did in Poland's 2001 election, the predicted probability of relabeling in the next election for otherwise typical parties increases \Sexpr{ped.fd} over when just 5\% of the vote is redistributed among parties.

<<label=enep.fd, echo=F, results='hide'>>==
enep.fd <- gsub("//", "/", fd.cust("t1m4","enep_lag", c(2, 9)))
@

<<label=cpl.fd, echo=F, results='hide'>>==
cpl.fd <- gsub("//", "/", fd.cust("t1m4","cabinet_party_last", c(2, 9)))
cpl.fd <- gsub("-", "", cpl.fd)
@


Although more pluralistic electorates tend also to be more volatile, ($R =$ \Sexpr{round(cor(c.data$enep_lag, c.data$pedersen, use = "complete.obs"), 2)}), the result just described for party system weakness obtains even though electoral pluralism is also included in the model.  Pluralism in the electorate is itself a predictor of party rebranding.  When voters are divided among a larger number of parties, parties are more likely to relabel themselves.  Given otherwise typical circumstances, the probability of changing names increases by \Sexpr{enep.fd} when the effective number of electoral parties in the last election was 9 (typical of recent elections in Belgium) rather than 2 (as is common in Maltese elections).

Moreover, the estimated effect of party system weakness does not depend on party characteristics.  Models A2 through A4, presented in Table~\ref{T:a.table1} of the web appendix, include interactions of volatility with brand exposure, electoral shock, and party size, respectively.  None of the estimated coefficients of these interaction terms reach statistical significance, and in fact all of these estimates are vanishingly small.  It would seem that all parties---regardless of size, success in the past election, and the experience of voters with their brands---become more likely to relabel themselves when much of the electorate does not display loyalty to any party, just as the party-system-weakness theory predicts.


\section*{Ideology and External Shocks: The Collapse of Communism}
Having found support for each of the three theories of party rebranding discussed above, we turn now to a final argument found in the literature on parties and party change.  In elaborating the circumstances beyond electoral shocks that may be expected to cause parties to seek to reform their identities, \citep[270]{Harmel1994} point to events that raise doubts even among the purists within the party regarding whether its key policy positions and ideology are correct.  This theory borders on tautology when expressed in general terms, but their primary example, ``the impact of the fall of the Berlin Wall and the failure of Soviet communism'' on parties of the left \citep[270]{Harmel1994}, yields a readily testible hypothesis when applied to rebranding: the events of 1989 constituted an external shock that led parties that held positions on the ideological left to be more likely to relabel themselves.


<<label=cold.war.models, echo=F, results='hide'>>==
base.model2 <- paste(base.model, "+ name_exp + elec_shock + pedersen")

c.data$right_left <- 10 - c.data$left_right

# baseline
t2m1 <- glmer(as.formula(paste("change ~", base.model2, "+ (1|cparty) +
                               (1|election) + (1|country)")),
              data = c.data[!is.na(c.data$right_left), ], family = "binomial", nAGQ = 0)
# left ideology
t2m2 <- glmer(as.formula(paste("change ~", base.model2, "+ right_left +
                               (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)



# end of cold war
c.data$pcw <- as.numeric(c.data$year>1989)
t2m3 <- glmer(as.formula(paste("change ~", base.model2, "+ right_left + pcw + 
                               (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# end of cold war *for the left*
t2m4 <- glmer(as.formula(paste("change ~", base.model2, "+ right_left + pcw + pcw:right_left + 
                               (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

fd.cust.i <- function(model = NULL, iv1 = NULL, iv2=NULL, range = c(0, 1), iv2.val=0, digits=0) {
    mod.sims <- sims.glmer(get(model))
    mod <- get(model)
    iv12 <- paste0(iv1,":",iv2)
    if (class(mod)!="lmerMod" & class(mod)!="glmerMod") {
        if (!iv12 %in% names(mod$coef)) iv12 <- paste0(iv1,":",iv2)
    } else if (!iv12 %in% unlist(dimnames(mod@pp$X)[2])) iv12 <- paste0(iv2,":",iv1)
    sims.t <- mod.sims[c(iv1, iv2, iv12)]
    fake.data <- data.frame(iv1 = range, iv2 = iv2.val)
    fake.data$v12 <- with(fake.data, iv1*iv2)
    pp <- qlogis(mean(mod@frame$change)) - matrix(c(mean(mod@frame[[iv1]]), mean(mod@frame[[iv2]]), mean(mod@frame[[iv1]])*mean(mod@frame[[iv2]])), nrow=1)%*%t(data.matrix(sims.t))
    pp <- rbind(pp, pp)
    pp <- plogis(pp + data.matrix(fake.data) %*% t(data.matrix(sims.t)))
    diff <- pp[2,] - pp[1,] 
    fd <- mean(diff)*100
    fd <- c(fd, quantile(diff, probs = c(0.025, 0.975))*100)
    out <- paste(round(fd[1], digits), "percentage points (95\\% C.I.,", round(fd[2], digits), "to", round(fd[3], digits),"points)")
    out
}

@

<<label=pcw_plot, echo=F>>==
interplot.glmerMod <- function(m, var1, var2, xlab = NULL, ylab = NULL, seed = 324, 
    sims = 1000, steps = 100, xmin = NA, xmax = NA, labels = NULL, plot = TRUE, point = FALSE) {
    set.seed(seed)
    
    m.class <- class(m)
    m.sims <- arm::sim(m, sims)
    
    ifelse(var1 == var2, var12 <- paste0("I(", var1, "^2)"), var12 <- paste0(var2, 
        ":", var1))
    
    if (!var12 %in% unlist(dimnames(m@pp$X)[2])) 
        var12 <- paste0(var1, ":", var2)
    if (!var12 %in% unlist(dimnames(m@pp$X)[2])) 
        stop(paste("Model does not include the interaction of", var1, "and", 
            var2, "."))
    if (is.na(xmin)) 
        xmin <- min(m@frame[var2], na.rm = T)
    if (is.na(xmax)) 
        xmax <- max(m@frame[var2], na.rm = T)
    
    if (is.null(steps)) {
        steps <- eval(parse(text = paste0("length(unique(na.omit(m$model$",var2,")))")))
        if (steps > 100) steps <- 100 # avoid redundant calculation
    }
    
    
    coef <- data.frame(fake = seq(xmin, xmax, length.out = steps), coef1 = NA, 
        ub = NA, lb = NA)
    
    for (i in 1:steps) {
        coef$coef1[i] <- mean(m.sims@fixef[, match(var1, unlist(dimnames(m@pp$X)[2]))] + 
            coef$fake[i] * m.sims@fixef[, match(var12, unlist(dimnames(m@pp$X)[2]))])
        coef$ub[i] <- quantile(m.sims@fixef[, match(var1, unlist(dimnames(m@pp$X)[2]))] + 
            coef$fake[i] * m.sims@fixef[, match(var12, unlist(dimnames(m@pp$X)[2]))], 
            0.975)
        coef$lb[i] <- quantile(m.sims@fixef[, match(var1, unlist(dimnames(m@pp$X)[2]))] + 
            coef$fake[i] * m.sims@fixef[, match(var12, unlist(dimnames(m@pp$X)[2]))], 
            0.025)
    }
    
    if (plot == TRUE) {
        interplot.plot(m = coef, steps = steps, ylab = ylab, xlab = xlab, point = point)
    } else {
        names(coef) <- c(var2, "coef", "ub", "lb")
        return(coef)
    }
} 

interplot.plot <- function(m, ylab = NULL, xlab = NULL, steps = NULL, point = FALSE, ...) {
  if(is.null(steps)) steps <- nrow(m)
  levels <- sort(unique(m$fake))
  
  if (steps <= 10 | point == T) {
    coef.plot <- ggplot(m, aes(x = fake, y = coef1)) + geom_point() + 
      geom_errorbar(aes(ymin = lb, ymax = ub), width = 0) + 
      scale_x_continuous(breaks = levels) + 
      theme_bw() + ylab(ylab) + xlab(xlab)
  } else {
    coef.plot <- ggplot(m, aes(x = fake, y = coef1)) + geom_line() + 
      geom_ribbon(aes(ymin = lb, ymax = ub), alpha = 0.5) + theme_bw() + 
      ylab(ylab) + xlab(xlab)
  }
  return(coef.plot)
} 

pcw.i <- interplot.glmerMod(t2m4, "pcw", "right_left", sims=5000, xlab="Left Ideology", ylab="Coefficient for Post-1989 Period")
ggsave("pcw_interaction.pdf", plot = pcw.i, width=4, height=4)

@

%\end{spacing}

<<label=pcw.table, echo=FALSE, results='asis'>>==
# Ideology
vars2 <- c(vars, "Left Ideology", "Post-1989", "Left Ideology $\\times$ Post-1989")

models.t2 <- list()
for (i in 1:4) {
    models.t2[i] <- format.for.texreg(get(paste0("t2m", i)))
}

texreg(l=models.t2, label="T:models.t2", 
       caption="The Fall of Communism and Party Ideology, Cross-Classified Hierarchical Models",
       stars = c(0.001, 0.01, 0.05, 0.1), symbol="\\dagger",
       caption.above=T, 
       custom.coef.names=c("Intercept", vars2), 
       custom.model.names=c(paste("Model", 5:8)),
       custom.gof.names = c(NA, "Party-Elections", "Parties", "Elections", "Countries", "Variance: Parties", "Variance: Elections", "Variance: Countries"),
        reorder.coef = c(6:8, 2:5, 9:11, 1)
)
@


<<label=fc0.fd, echo=F, results='hide'>>==
fc0.fd <- gsub("//", "/", fd.cust("t2m3","pcw", c(0, 1)))
@

<<label=fc.fd, echo=F, results='hide'>>==
fc.fd <- gsub("//", "/", fd.cust.i("t2m4", "pcw", "right_left", iv2.val=8.17))
@

<<label=fc2.fd, echo=F, results='hide'>>==
fc2.fd <- gsub("//", "/", fd.cust.i("t2m4", "pcw", "right_left", iv2.val=4))
@

We draw on the left-right ideology variable in the ParlGov data, which is based on the expert surveys presented in \citet{Castles1984, Huber1995a, Benoit2006}; and \citet{Hooghe2010}.  The variable has a theoretical range from 0 to 10; to facilitate interpretation, we reverse the original scale so that higher values indicate party ideologies further to the left.  Missing data in this variable reduces the size of our sample somewhat, so for the sake of comparison, Model 5 of Table~\ref{T:models.t2} presents the results when applying the specification of Model 4, Table~\ref{T:models.t1} to this restricted sample.  The results are substantively similar, though the magnitudes and statistical significance of the estimated coefficients for electoral shocks, incumbent government, and electoral pluralism decline somewhat.  Model 6 adds the ParlGov measure of left ideology; it provides no evidence that parties on the left or right are particularly likely to change their names, and the results for other variables are unchanged.  Model 7 adds a dummy variable that is coded one for elections held after 1989 and zero otherwise.  Its results indicate that, on average, European parties were more likely to rename themselves after the fall of the Berlin Wall than before; according to this model, the predicted probability for an otherwise typical party was estimated to increase \Sexpr{fc0.fd} in the post-Cold War era.  

Model 8 incorporates the interaction of the post-1989 dummy with left ideology to test the conditional hypothesis that the collapse of communism prompted \emph{left} parties to rebrand and so present a new identity to voters.  Interaction terms require special care in interpretation.  In particular, the estimated coefficients of their constituitive terms should not be interpreted in isolation.  Rather, the coefficient of one constituent variable, such as the post-1989 period, must be assessed over the observed range of the other constituent variable, such as left ideology \citep[see, e.g.,][71-72]{Brambor2006}.  In other words, the effect of the post-1989 period on a party's propensity to relabel is now estimated as not only as the coefficient of the post-1989 dummy but the sum of that term and the product of the coefficient of the interaction term and the value for that party on the left-ideology variable: $\frac{\partial \mathit{Propensity \thinspace to \thinspace Relabel}}{\partial \mathit{post\mhyphen 1989}} = \beta_{\mathit{post\mhyphen 1989}} + \beta_{\mathit{post\mhyphen 1989} \times \mathit{Left \thinspace Ideology}} \mathit{Left \thinspace Ideology}$.  This quantity is plotted in Figure~\ref{F:pcw}, which shows that the estimated coefficient for the post-1989 period is very nearly zero and not statistically significant for parties with low scores on the left-ideology variable but becomes larger and statistically significant at higher values of left ideology.

\begin{figure}[htbp] 
  \caption{Effect of the Collapse of Soviet Communism by Ideology}
  \label{F:pcw}
  \begin{center}
    \includegraphics[width=4in]{pcw_interaction.pdf}
  \end{center}
  \begin{footnotesize}
  \begin{tabular}{p{.1in} p{3.75in}}
  & \emph{Note}: Based on results reported in Table~\ref{T:models.t2}, Model 6.
  \end{tabular}
  \end{footnotesize}
\end{figure}


For a party with an ideological profile similar to Sweden's \emph{Vänsterpartiet} (the Left, V), which was scored at about 8.2 on the 0 to 10 ParlGov scale, the fall of Communism was estimated to increase the probability of party relabeling by \Sexpr{fc.fd}, again assuming mean values for all other variables.  (The party had competed as the \emph{Vansterpartiet Kommunisterna}---the Left Communists, VKP---until changing its name in 1990.)  For parties just to the right of center (those with a left-ideology score of 4), the predicted probability of relabeling increased by \Sexpr{fc2.fd}. For parties even further to the right, the estimated effect of the events of 1989 are not distinguishable from zero.  The massive shock that was the collapse of Communism in Eastern Europe led many parties on the left, even those like the \emph{Vänsterpartiet} that had been vocal critics of the Soviet Union, to decide to present a new brand to voters.


\section*{Conclusions}
This paper provides the first effort to quantify party relabeling across Europe and tests three explanations derived from the existing literature---regarding brand exposure, electoral shocks, and weak party systems---to understand party name changes in the European setting. It shows that across European democracies, roughly a third of all parties have relabeled themselves at least once since 1945, and a similar proportion of elections include at least one party running under a new name. Our analyses find support for all three of the hypotheses of party relabeling derived from the extant literature. Specifically, brands that have been exposed to the electorate more often tend to be less likely to be replaced than their newer counterparts. In line with the theory of electoral shocks, parties that did poorly in the last election are more likely to relabel.  And, as the weak-party-system theory suggests, parties within party systems with a high degree of electoral volatility are more likely to change their labels.

In this paper, we present the first comprehensive dataset that documents relabeling of parties covering all European democracies since 1945. This dataset will help researchers in the field greatly by redressing existing data sources' inattention to the names with which parties actually contest elections, an inattention that has no doubt reinforced scholarly neglect of this aspect of party behavior.

Our findings contribute to the larger literature on parties as brands by providing the first systematic test of these arguments in a cross-national setting, and, as such, they also provide important theoretical implications regarding party relabeling as a party strategy.  First, the existing literature generally assumes party labels are constant and therefore neglects to consider the issue at all.  As we have shown, however, at least within Europe's democracies, party name changes are not rare.  This fact suggests that theories of parties and partisanship that have considered the information conveyed by a party label to be determined by the party's policy positions and alliance behavior relative to its opponents \citep[see, e.g.,][]{Snyder2002, Lupu2013} would benefit from revisions incorporating whether the party retains its current label or chooses a new one. 

Second, the evidence in favor of the brand-exposure, electoral-shock, and weak-party-system theories suggest that parties choose if and when to rebrand themselves quite rationally.  Parties change their names when their existing names have not yet acquired much brand equity, or when these names have accumulated negative associations, or when voters show little inclination to remain loyal to any party whatever its brand.  The high frequency of relabeling suggests that relabeling should be viewed as part of the repertoir of effective party strategies instead of a mere abberation. 

Third, and relatedly, these results suggest that the normative concern that changes to parties' names deprive voters of the information they need to vote correctly has been overstated.  In accordance with the brand-exposure and weak-party-system theories, name changes are most likely to occur in circumstances where the existing names conveyed the least information.

Although we find support for the brand-exposure, electoral-shock, and weak-party-system hypotheses, further study should yield additional insights.  These explanations surely do not encompass all of the circumstances that lead parties to relabel themselves.  One additional possibility is that parties change their labels as a means of signaling to voters their commitment to new appeals or promises.  That is, relabeling may be used as a signaling device, with the cost to the party brand lending additional credibility to the signal.  Whether taking a new name is in this way generally used as a complement to strategies such as changing policy positions \citep[see, e.g.,][]{Harmel1995} or varying the emphasis given particular issues \citep[see, e.g.,][]{Janda1995} that parties employ to change their images before the electorate or is instead more commonly a substitute for these more substantive strategies, however, remains an open question.  The consequences of relabeling, most importantly for parties' electoral support, is also a promising avenue of inquiry.  More fully explaining the phenomenon of party relabeling by developing such theoretical arguments and collecting the quantitative and qualitative data appropriate to testing them are tasks for future research.



\bibliographystyle{ajps}
\bibliography{Reference}

\end{spacing}
\newpage

\appendix
\section{Appendix}
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}

<<label=appmodels, echo=F, results='hide'>>==
base.model2 <- paste(base.model, "+ name_exp + elec_shock + pedersen")

# base model (t1m1)
a1 <- glmer(as.formula(paste("change ~", base.model2, " + 
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# quadratic name_exp? no
a2 <- glmer(as.formula(paste("change ~", base.model2, "+ I(name_exp^2) +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# interact name_exp with volatility? no
a3 <- glmer(as.formula(paste("change ~", base.model2, "+ name_exp:pedersen +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# interact prev_vote_rel with volatility? no
a4 <- glmer(as.formula(paste("change ~", base.model2, "+ prev_vote_rel_perc:pedersen +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# interact r_avg_vote with volatility? no
a5 <- glmer(as.formula(paste("change ~", base.model2, "+ r_avg_vote:pedersen +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# electoral systems
a6 <- glmer(as.formula(paste("change ~", base.model2, "+ pr + mix +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)

# democratic age
a7 <- glmer(as.formula(paste("change ~", base.model2, "+ log1p(dem_age) +
                (1|cparty) + (1|election) + (1|country)")),
              data = c.data, family = "binomial", nAGQ = 0)

# electoral systems and democratic age
a8 <- glmer(as.formula(paste("change ~", base.model2, "+ pr + mix + log1p(dem_age) +
                (1|cparty) + (1|election) + (1|country)")),
             data = c.data, family = "binomial", nAGQ = 0)
@

<<label=apptable0, echo=FALSE, results='asis'>>==
library(stargazer)
library(stringr)
library(dplyr)

keep.vars <- c("change", str_trim(str_split(paste(base.model2, "+ pr + mix + dem_age"), " \\+ \\n?")[[1]]))

keep.vars <- str_replace_all(keep.vars, "log1p\\(|\\)", "")

used.data <- c.data %>% select(one_of(keep.vars))

vars.a0 <- str_replace(c("Party Relabeling", vars, "Proportional Representation", "Mixed System", "Democratic Age"), ", Logged", "")

stargazer(used.data, title="Descriptive Statistics", digits=2,
          covariate.labels=vars.a0)
@

<<label=apptable1, echo=FALSE, results='asis'>>==
a.models <- list()
for (i in 1:8) {
    a.models[i] <- format.for.texreg(get(paste0("a", i)))
}

vars.a1 <- c(vars, "Brand Exposure$^2$", "Party System Weakness $\\times$ Brand Exposure", "Party System Weakness $\\times$ Electoral Shock", "Party System Weakness $\\times$ Party Size")

# Brand Exposure Squared, Volatility Interactions
texreg(l=a.models[c(1:5)], label="T:a.table1", 
       caption="Additional Specifications, Cross-Classified Hierarchical Models",
       stars = c(0.001, 0.01, 0.05, 0.1), symbol="\\dagger",
       caption.above=T, 
       custom.coef.names=c("Intercept", vars.a1), 
       custom.model.names=c("Model 4", paste0("Model A", 1:4)),
       custom.gof.names = c(NA, "Party-Elections", "Parties", "Elections", "Countries", "Variance: Parties", "Variance: Elections", "Variance: Countries"),
       reorder.coef = c(6:8, 2:5, 9:12, 1)
)
@

<<label=apptable2, echo=FALSE, results='asis'>>==
# Institutions

vars.a2 <- c(vars, "Proportional Representation", "Mixed System", "Democratic Age")

texreg(l=a.models[6:8], label="T:a.table2", 
       caption="Institutional Effects, Cross-Classified Hierarchical Models",
       stars = c(0.001, 0.01, 0.05, 0.1), symbol="\\dagger",
       caption.above=T, 
       custom.coef.names=c("Intercept", vars.a2),  
       custom.gof.names = c(NA, "Party-Elections", "Parties", "Elections", "Countries", "Variance: Parties", "Variance: Elections", "Variance: Countries"), 
       custom.model.names=c(paste0("Model A", 5:7)),
       reorder.coef = c(6:8, 2:5, 9:11, 1)
)
@


\end{document}
